<template>
  <div class="final-page" :style="page && page.props">
    <div v-for="item in components" :id="`component-${item.id}`" :key="item.id">
      <component :is="item.name" v-bind="item.props" />
    </div>
  </div>
</template>

<script lang="ts">
import { ComponentData, PageData } from '@/defaultProps'
export default {
  name: 'FinalPage'
}
</script>
<script lang="ts" setup>
// const props = defineProps({
//   page: Object as PropType<PageData>,
//   components: Array as PropType<ComponentData[]>
// })
defineProps<{
  page?: PageData
  components: ComponentData[]
}>()
</script>
